@extends('admin.common.admin')

@section('cnt')
    {{-- 面包屑导航 --}}
    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 文章管理
        <span class="c-gray en">&gt;</span> 统计列表
        <a class="btn btn-success" href="{{ route('admin.article.index') }}">返回列表</a>
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <div class="page-container">
        @include('admin.common.msg')

        <div class="text-c">
            <form>
                日期范围：
                <input type="text" value="{{ request()->get('datemin') }}" autocomplete="off" onfocus="WdatePicker({})" name="datemin" class="input-text Wdate" style="width:120px;">
                -
                <input type="text" value="{{ request()->get('datemax') }}" autocomplete="off" onfocus="WdatePicker({})" name="datemax" class="input-text Wdate" style="width:120px;">
                <input type="text" class="input-text" style="width:250px" value="{{ request()->get('username') }}" placeholder="输入账号" name="username">
                <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
            </form>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                <tr class="text-c">
                    <th>姓名</th>
                    <th>性别</th>
                    <th>手机号码</th>
                    <th>邮箱</th>
                    <th>用户创建时间</th>
                    <th>用户状态</th>
                    <th>访问量</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $item)
                    <tr class="text-c">
                        <td>{{ $item->renting->truename }}</td>
                        <td>{{ $item->renting->sex }}</td>
                        <td>{{ $item->renting->phone ?? '无' }}</td>
                        <td>{{ $item->renting->email ?? '无' }}</td>
                        <td>{{ $item->renting->created_at }}</td>
                        <td class="td-status">
                            @if(!$item->renting->deleted_at)
                                <span class="label label-success radius">已启用</span>
                            @else
                                <span class="label label-danger radius">禁用</span>
                            @endif
                        </td>
                        <td>{{ $item->count }}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
@endsection